package com.merry.sb.controller;


import com.github.pagehelper.PageInfo;
import com.merry.sb.service.MyService;
import com.merry.sb.vo.PageVO;
import com.merry.sb.vo.User;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController()
@RequestMapping("/test")
public class MyController {
    @Resource
    MyService service;

    @PostMapping("/queryWithPage")
    public PageInfo<User> queryWithPage(@RequestBody PageVO vo){
        PageInfo<User> userPageInfo = service.queryWithPage(vo);
        return userPageInfo;
    }

}
